#include <iostream>
#include <string>

int main() {
    int c_open = 0;
    int c_close = 0;
    
    std::string s;
    std::cin >> s;
    
    for (char c : s) {
        if ( c=='(' ) c_open++;
        if ( c==')' ) c_close++;
        
    }
    
    std::cout <<"Открытых: " << c_open << std::endl;
    std::cout <<"Закрытых: " << c_close << std::endl;
    return 0;
}